<%def name="listjourneys()">
    <ol>
    <% flag = 0 %>
    % for j in ctx.journeys:
            % if flag == 0 and j.user == ctx.user:
                <% flag = 1 %>
                <div id=ownj>
            % endif    
            % if flag == 1 and j.user != ctx.user:
                <% flag = 2 %>
                </div>
            % endif    
    
            <li id=lstj>
            <h4>
            %if j.public:
                pub.
            &nbsp;
            %endif
            <a href="/myjourney/view?journey=${str(j.key())}">
            % if j.name:
                ${j.name|h}
            %else:
                #empty
            % endif       
            </a>&nbsp;
            <a href="/myjourney/georsssimple?journey=${str(j.key())}">GeoRSS simple</a>
            
            % if j.user != ctx.user:
                &nbsp;by ${j.user.nickname()|ctx.h.hidemail}
            % endif
            </h4>
            ${j.desc|h,ctx.h.replws}<br>
            % if j.started or j.ended:
                <!--   TABL     -->

                <table id=lstji >
                <tr><td>
            % endif
            % if j.started:
                <i>Started on <b>${j.started}</b></i>&nbsp;
            % endif
            %if j.ended:
                <i>Finished on <b>${j.ended}</b></i></td>
                </tr><tr><td>
            % endif
            % if j.length:
                <i>Length <b>${j.length}</b></i><br>
            % endif
            % if j.started or j.ended:
                </td></tr>
                </table>
            % endif    
            </li>
    % endfor
    </ol>
</%def>


